﻿Imports Microsoft.VisualBasic

Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports extremo



'''<summary>
'''This is a test class for ReservaNegocioTest and is intended
'''to contain all ReservaNegocioTest Unit Tests
'''</summary>
<TestClass()> _
Public Class ReservaNegocioTest


    Private testContextInstance As TestContext

    '''<summary>
    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''</summary>
    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(value As TestContext)
            testContextInstance = Value
        End Set
    End Property

#Region "Additional test attributes"
    '
    'You can use the following additional attributes as you write your tests:
    '
    'Use ClassInitialize to run code before running the first test in the class
    '<ClassInitialize()>  _
    'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
    'End Sub
    '
    'Use ClassCleanup to run code after all tests in a class have run
    '<ClassCleanup()>  _
    'Public Shared Sub MyClassCleanup()
    'End Sub
    '
    'Use TestInitialize to run code before running each test
    '<TestInitialize()>  _
    'Public Sub MyTestInitialize()
    'End Sub
    '
    'Use TestCleanup to run code after each test has run
    '<TestCleanup()>  _
    'Public Sub MyTestCleanup()
    'End Sub
    '
#End Region


    '''<summary>
    '''A test for insertar
    '''</summary>
    <TestMethod()> _
    Public Sub insertarTest()

        Dim oNegocio = New ReservaNegocio

        Try
            oNegocio.insertar("s", "4872", "m", "2", "1")
        Catch ex As Exception

            Assert.Fail("Falló la prueba")

        End Try

    End Sub

    '''<summary>
    '''A test for listar
    '''</summary>
    <TestMethod()> _
    Public Sub listarTest()

        Dim oNegocio = New ReservaNegocio

        Dim listado = oNegocio.listar()

        Assert.AreEqual(listado.Count, 3)
    End Sub

    '''<summary>
    '''A test for buscarPorFecha_reserva
    '''</summary>
    <TestMethod()> _
    Public Sub buscarPorFecha_reservaTest()
        Dim target As ReservaNegocio = New ReservaNegocio() ' TODO: Initialize to an appropriate value
        Dim fecha_reserva As String = String.Empty ' TODO: Initialize to an appropriate value
        Dim expected As Collection = Nothing ' TODO: Initialize to an appropriate value
        Dim actual As Collection
        actual = target.buscarPorFecha_reserva(fecha_reserva)
        Assert.AreEqual(expected, actual)
        Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub
End Class
